#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>

using namespace std;

typedef double db;

const int MAXN = 1e5+10;

db val[MAXN<<2],a[MAXN];
int len[MAXN<<2],n,m;

int pushup(db x,int o,int l,int r){
	if(val[o] <= x) return 0;
	if(a[l] > x) return len[o];
	if(l == r) return val[o] > x;
	int mid = l+r>>1;
	if(val[o<<1] > x) return pushup(x,o<<1,l,mid) + len[o] - len[o<<1];
	else return pushup(x,o<<1|1,mid+1,r);
}

void upd(int pos,db v,int o = 1,int l = 1,int r = n){
	if(l == r){
		val[o] = v;
		len[o] = 1;
		return;
	}
	int mid = l+r>>1;
	if(pos <= mid) upd(pos,v,o<<1,l,mid);
	else if(pos > mid) upd(pos,v,o<<1|1,mid+1,r);
	val[o] = max(val[o<<1],val[o<<1|1]);
	len[o] = len[o<<1] + pushup(val[o<<1],o<<1|1,mid+1,r);
}

int main(){
	scanf("%d %d",&n,&m);
	while(m--){
		int x,y;scanf("%d %d",&x,&y);
		a[x] = (db)y/x;
		upd(x,a[x]);
		printf("%d\n",len[1]);
	}
	return 0;
}
